<!--
  @author mujunlin
  @since 2019/08/22 01:08
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:replace="common/common :: jscss"/>
</head>
<body>

<div class="layui-fluid">

    <blockquote class="layui-crumb">
        <a lay-href="/service/tariff/list.action">价格表管理></a>
        <zmn th:text="(${faultTariff == null || faultTariff.tariffName == null}) ? '' : ${faultTariff.tariffName}+'>'">价格表名称</zmn>
        <zmn>服务产品></zmn>
        <zmn th:text="(${product == null || product.name == null}) ? '' : ${product.name}+'>'">产品名称</zmn>
        <zmn th:text="(${faultItem == null || faultItem.itemName == null}) ? '' : ${faultItem.itemName}+'>'">项目名称</zmn>
        <a lay-text="产品价格表" th:lay-href="|/product/tariff/group/listTable.action?productId=${vo.productId}&tariffId=${vo.tariffId}|">产品价格表></a>
        <zmn>城市价格></zmn>
        <zmn>新增城市价格</zmn>
    </blockquote>

    <div class="layui-card">
        <div class="layui-card-body">
            <form method="POST" class="layui-form">
                <div class="layui-form-item">
                    <div th:if="${vo.priceStandard == 2}" class="layui-inline">
                        <label style="margin-left: -60px" class="layui-form-label layui-form-required">销售价：</label>
                        <div class="layui-input-inline" style="width: 110px;">
                            <input lay-verify="required" th:value="${currentCityPrice.price}" type="text" name="price" autocomplete="off" class="layui-input"
                                   maxlength="20"/>
                        </div>
                    </div>

                    <div th:if="${vo.priceStandard == 1}" class="layui-inline">
                        <label style="margin-left: -60px" class="layui-form-label layui-form-required">销售价：</label>
                        <div class="layui-input-inline" style="width: 110px;">
                            <input type="text" th:value="${currentCityPrice.negotiableMinPrice}" name="negotiableMinPrice" autocomplete="off" class="layui-input">
                        </div>
                        <div class="layui-form-mid">-</div>
                        <div class="layui-input-inline" style="width: 110px;">
                            <input type="text" th:value="${currentCityPrice.negotiableMaxPrice}" name="negotiableMaxPrice" autocomplete="off" class="layui-input">
                        </div>
                    </div>

                    <div class="layui-inline">
                        <label class="layui-form-label">内部价：</label>
                        <div class="layui-input-inline" style="width: 110px;">
                            <input th:disabled="${faultItem.priceStandard == null || faultItem.priceStandard == 1}" th:class="${faultItem.priceStandard == null || faultItem.priceStandard == 1 ? 'layui-input layui-disabled' : 'layui-input'}" type="text" th:value="${currentCityPrice.internalSettlementPrice}" name="internalSettlementPrice" autocomplete="off"
                                   maxlength="20"/>
                        </div>
                    </div>

                    <div class="layui-inline">
                        <label class="layui-form-label">外部价：</label>
                        <div class="layui-input-inline" style="width: 110px;">
                            <input th:disabled="${faultItem.priceStandard == null || faultItem.priceStandard == 1}" th:class="${faultItem.priceStandard == null || faultItem.priceStandard == 1 ? 'layui-input layui-disabled' : 'layui-input'}" type="text" th:value="${currentCityPrice.externalSettlementPrice}" name="externalSettlementPrice" autocomplete="off"
                                   maxlength="20"/>
                        </div>
                    </div>
                </div>

                <input type="hidden" name="relateId" th:value="${vo.relateId}"/>
                <input type="hidden" name="productId" th:value="${vo.productId}"/>
                <input type="hidden" name="tariffId" th:value="${vo.tariffId}"/>
                <input type="hidden" name="itemId" th:value="${vo.itemId}"/>
                <input type="hidden" name="groupId" th:value="${vo.groupId}"/>
                <input type="hidden" name="priceStandard" th:value="${vo.priceStandard}"/>

                <div class="inline-block" style="float: left">
                    <div class="zmn-2layer-list" th:each="m : ${provinces}">
                        <div class="list-left" th:if="${not #lists.isEmpty(cityMap[m.areaId])}" style="text-align: center">
                            <div class="list-item" th:text="${m.name + '：'}"></div>
                        </div>
                        <div class="list-right" th:if="${not #lists.isEmpty(cityMap[m.areaId])}">
                            <div class="right-box">
                                <div class="list-item">
                                    <input type="checkbox" class="checkAll" lay-filter="checkAll" th:value="${m.areaId}" title="全选">
                                </div>
                                <div class="list-item" th:each="city : ${cityMap[m.areaId]}" th:title="${city.name}">
                                    <input type="checkbox" lay-filter="checkOne" name="areaId" th:class="${m.areaId}" th:value="|${city.parentId}-${city.areaId}|"
                                            th:title="${city.name}">
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="layui-split">&nbsp;</div>

                <div class="layui-form-item submit">
                    <div style="margin-left: 115px" class="layui-input-block">
                        <button th:if="${#authPermit.checkPermit('/product/tariff/item/city/price/batchAddCityPrice.action')}" class="layui-btn" lay-submit="" lay-filter="zmn-form-submit">保存</button>
                        <button class="layui-btn layui-btn-primary" id="cancel" onclick="zmnLayUtil.closeThisTabs()">取消</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
</body>
</html>
<script type="text/javascript" th:inline="javascript">
    var json = {
        vo: [[${vo}]]
    };
    layui.config({
        base: "/static/lay/",
        version: 20191219230330
    }).extend({
        index: "lib/index",
        serv_product_tariff_item_city_price_citys: "product/service/item/city/price/zmn.plat.product.tariff.item.city.price.citys",
    }).use(['index', 'serv_product_tariff_item_city_price_citys']);

</script>